package com.garygyp.eduservice.controller;

import com.garygyp.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author GaryGyp
 * @date 2022/5/9 14:57
 * @description
 */
@CrossOrigin  // 解决跨域问题
@RestController
@RequestMapping("/eduservice/user")
public class EduLoginController {

    // login
    @PostMapping("login")
    public R login() {
        return R.ok().data("token", "admin");
    }

    // info
    @GetMapping("info")
    public R info() {
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://online-teach-file.oss-cn-beijing.aliyuncs.com/teacher/2019/10/30/de47ee9b-7fec-43c5-8173-13c5f7f689b2.png");
    }

}
